//
//  NYLoginViewController.m
//  BS
//
//  Created by neal on 15/8/16.
//  Copyright (c) 2015年 Neal. All rights reserved.
//

#import "NYLoginViewController.h"

@interface NYLoginViewController ()
@property (weak, nonatomic) IBOutlet UIButton *login;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *leftX;
@property (weak, nonatomic) IBOutlet UIButton *loginorregister;

@end

@implementation NYLoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}
- (IBAction)LoginOrRegister:(UIButton *)sender {
    [self.view endEditing:YES];
    if (_leftX.constant) {
        _leftX.constant = 0;
        sender.selected = NO;
        
    } else {
        self.leftX.constant = - self.view.width;
        sender.selected = YES;
    }
    [UIView animateWithDuration:0.25 animations:^{
        [self.view layoutIfNeeded];

    }];
    
}

- (IBAction)backClick:(id)sender {
    [self dismissViewControllerAnimated:YES completion:^{
    }];
}
- (UIStatusBarStyle)preferredStatusBarStyle
{
    return  UIStatusBarStyleLightContent;
}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}
@end
